<div id="sidebar_right">
<h2>Kategori Artikel</h2>
	<ul class="nav">
		<?php 
		$i = 0;
		foreach($categories as $category){ ?>
			<li><span><a href="<?php echo base_url()."articles/article_category/".$i;?>"><?php echo $category; ?></a></span></li>
		<?php 
		$i++; 
		} ?>
	</ul>

<h2>Artikel Terbaru</h2>
	<ul class="recent_posts">
		<?php foreach($recent_articles as $recent_article){ ?>
			<li><a href="<?php echo base_url()."articles/detail/".$recent_article['id_artikel'];?>"><?php echo $recent_article['judul'];?></a><span><?php echo timestamp_to_date_time($recent_article['waktu_posting']);?></span>
			</li>
		<?php } ?>
	</ul>

<h2>Foto Terbaru</h2>
	<div id="flickr_widget">
		<?php foreach($recent_photos as $recent_photo){ ?>
			<a href="<?php echo base_url()."photos/detail/".$recent_photo['id_foto'];?>"><img src="<?php echo base_url()."images/photos/".$recent_photo['foto'];?>" title="<?php echo $recent_photo['judul'];?>" /></a>
		<?php } ?>
	</div>
</div>